<?php
require 'picks_model.php';

class Viewer_Model extends Picks_Model {

    function __construct() {
        parent::__construct();
    }
    
    function GetUsernames() {
        $sth = $this->database->prepare("SELECT memberId, username FROM Members");
        $sth->execute();
        
        return $sth;
    }
    
    function GetMemberIDUsername($memberId) {
        $sth = $this->database->prepare("SELECT username FROM Members WHERE memberId=:memberId");
        $sth->execute(array(
            ':memberId' => $memberId
        ));
        $data = $sth->fetch();
 
        return $data['username'];
    }
}